package com.lu.statistics.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lu.statistics.entity.SysAppRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysAppRoleMapper extends BaseMapper<SysAppRole> {

    List<SysAppRole> queryRoleList();
    /**
     * 查询最新的应用角色编号
     *
     * @return
     */
    public String queryMaxAppRoleCode();
    /**
     * 按角色编码查询角色信息
     *
     * @param code
     * @return
     */
    public SysAppRole queryRoleByRoleCode(@Param("code") String code);

    /**
     * 按角色名称和角色Id统计App角色数量
     *
     * @param roleName
     * @param id
     * @return
     */
    public int queryRoleCount(@Param("roleName") String roleName, @Param("id") Integer id);
}
